<?php
$page_params = $this->Paginator->params();
/*echo "<table width='50%' class='bg4'><tr>";
//echo "<td width='20%' align='left' class='txtblueb' id='divPageResult'>".$this->Paginator->counter(array('separator' => ' of '))."&nbsp;&nbsp;&nbsp</td>";

echo "<td  align='center' class='txtblueb'><div style='float:left; margin:2px 5px 0 0'>Per Page?:</div><div style='float:left;'>";

    $page_params = $this->Paginator->params();

    $limit = $page_params['limit'];
    $options = array( 10 => '10', 25 => '25', 50 => '50', 75 => '75', 100 => '100' );
    echo $this->Form->create('', array('type' => 'get', 'url'=>'/reports/checkPayable/'.$Month.'/'.$Year.'/'.$switch));
    echo $this->Form->select('limit', $options, array(
            'value' => $limit,
            'default' => 25,
            'empty' => FALSE,
            'onChange' => 'this.form.submit();',
            'name' => 'limit',
        )
    );
    echo $this->Form->end();
    
    echo "</div></td>";*/
    
if ($this->Paginator->numbers()) {
    echo "<table width='50%' class='bg4'><tr>";
    echo "<td  align='center' class='txtblueb'>";
    if($page_params['page'] == 1){
        echo $this->Html->image('Images/FirstOff.gif');
    } else{
        echo $this->Paginator->first( $this->html->image('Images/First.gif', array('alt' =>__('FIRST'), 'title' => __('FIRST'))), array('escape' => false));
    }
    

    echo "</td><td  align='center' class='txtblueb'>";
    //echo $this->Paginator->prev(__('PREV'), array('tag' => false));
    echo $this->Paginator->prev( $this->html->image('Images/Prev.gif', array('alt' =>__('PREV'), 'title' => __('PREV'))), array('escape' => false));

    echo "</td>";

    echo "<td  align='center' class='txtblueb' id='divPageResult'>" . $this->Paginator->counter(array('separator' => ' of ')) . "</td>";
//echo $this->Paginator->numbers(); //  Output clickable page numbers

    echo "</td><td  align='center' class='txtblueb'>";

    //echo $this->Paginator->next(__('NEXT'), array('tag' => false));
    echo $this->Paginator->next( $this->html->image('Images/Next.gif', array('alt' =>__('NEXT'), 'title' => __('NEXT'))), array('escape' => false));
    
    echo "</td><td ' align='center' class='txtblueb'>";

    //echo $this->Paginator->last(__('>>LAST'));
    //echo $this->Paginator->next( $this->html->image('Images/Last.gif', array('alt' =>__('LAST'), 'title' => __('LAST'))), array('escape' => false));
    if($page_params['page'] == $page_params['pageCount']){
        echo $this->Html->image('Images/LastOff.gif');
    } else{
        echo $this->Paginator->last( $this->html->image('Images/Last.gif', array('alt' =>__('LAST'), 'title' => __('LAST'))), array('escape' => false));
    }
}

    echo "</td></tr></table>";
?>